home *** CD-ROM | disk | FTP | other *** search
- LISTING 15 - Shows the effect of virtual destructors
- // tform.cpp: Create/delete some display fields
-
- #include "form.h"
- #include "cell.h"
- #include "column.h"
- #include "table.h"
- #include "popmenu.h"
-
- main()
- {
- Form f;
- f.add(new Cell);
- f.add(new Column);
- f.add(new Table);
- f.add(new Popmenu);
- return 0;
- }
-
- /* Output:
- ~Cell()
- ~Field()
- ~Column()
- ~Field()
- ~Table()
- ~Field()
- ~Popmenu()
- ~Column()
- ~Field()
- */
-